package com.example.springstudy.dao.res;

import com.example.springstudy.entity.Shop;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
public class ShopListRes {
    private int total;
    private int currentPage;
    private int totalPage;
    private List<Shop> list;

    public ShopListRes(List<Shop> list, int total, int page, int size){
        this.total = total;
        this.currentPage = page;
        this.totalPage = total%size==0?total/size:total/size+1;
        this.list = list;
    }
}
